package com.patterns.command;

/**
 * ConcreteCommand具体命令类
 * @author huangke
 *
 */
public class ConcreteCommand implements Command{
	
	private Receiver receiver;//持有命令执行者

	public ConcreteCommand(Receiver receiver) {
		this.receiver = receiver;
	}

	public void execute() {
		//此处有可能复杂业务，在真正的业务执行前或执行后做处理，比如日志记录
		receiver.action();
	}

}
